package com.lin.gulimall.product.config;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyRedissonConfig {

    @Bean
    public Redisson redisson() {
        Config config = new Config();
        //config.useSingleServer().setAddress("redis://" + redisHost + ":6379").setDatabase(0);
        config.useSingleServer().setAddress("redis://192.168.3.39:6379").setDatabase(0);
        return (Redisson) Redisson.create(config);
    }

}
